

<%
Function IsValidPhone(number)
  dim regex
  set regEx = New RegExp
  
  regEx.IgnoreCase = True
  
  regEx.Pattern = "^((28[0-9]{6})|((6|8)[0-9]{7})).*$"
  IsValidPhone = regEx.Test(number)
End Function


 If IsValidPhone("28718063") then
    Response.Write("OK1")
 End If
 If (IsValidPhone("66332456")) then
    Response.Write("OK2")
 end if
 If (not IsValidPhone("72815444")) then
    Response.Write("OK3")
 end if
 if (IsValidPhone("81234567")) then
    Response.Write("OK4")
 end if
 if (IsValidPhone("81234567-222")) then
    Response.Write("OK5")
 end if

%>